package com.prs.crm.dao.crm.impl;

import java.util.Collection;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.crm.AreasDao;
import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.crm.City;
import com.prs.crm.domain.crm.Areas;

public class AreasDaoImpl extends BaseDaoImpl<Areas> implements AreasDao {
	@Override
	public Collection<Areas> getByCity(City city) {
		Criteria criteria=this.getSession().createCriteria(Areas.class);
		criteria.add(Restrictions.eq("city", city));
		return criteria.list();
	}

}
